As a type of short-distance communication network, a communication network conforming to the Wi-Fi Direct specification is known (see Patent Document 1 and Non-Patent Document 1, for example). This type of communication network has features such as one-to-many connection is available, communication between slaves can be established via a master and the strength of security is relatively high, when compared with a Wi-Fi Ad-hoc network. Thus, in recent years, a communication network conforming to the Wi-Fi Direct specification has been used for various purposes such as data sharing. The present invention relates to a connection control method by a communication terminal in this type of communication network. However, application of the present invention is not limited to only a communication network conforming to the Wi-Fi Direct specification.
In a communication network conforming to the Wi-Fi Direct specification, a communication terminal which is not connected to the communication network exchanges communication messages relating to discovery with another communication terminal and thereby discovers the other communication terminal existing around the communication terminal itself. To be specific, the communication terminal executes a discovery process in which two states called a search state and a listen state are alternately repeated. In the search state, the communication terminal sequentially switches a plurality of communication channels, broadcasts a probe request on each of the communication channels, and receives a probe response to the probe request. On the other hand, in the listen state, the communication terminal selects any one of the plurality of communication channels as a communication channel called a listen channel, receives a probe request from another communication terminal through the listen channel, and transmits a probe response to the probe request. Transmission of a probe response can be performed in the listen state, but cannot be performed in the search state. The durations of the search state and the listen state are random, and the durations of use of the respective communication channels in the search state are also random.
The communication terminal receives a probe response to a probe request transmitted through a given communication channel in the search state, thereby recognizing the presence of another communication terminal around the communication terminal itself and also recognizing a listen channel used by the other communication terminal. On the other hand, the other communication terminal receives a probe request in the listen state, thereby recognizing the presence of another communication terminal around the other communication terminal itself and returning a probe response. Because a probe request contains information of a listen channel used by a communication terminal transmitting the probe request, a communication terminal receiving the probe request can analyze the probe request and thereby know the listen channel used by the transmitter communication terminal.
In the communication network conforming to the Wi-Fi Direct specification, the communication terminal still continues the discovery process after finding the other communication terminal in the discovery process. When connection to the other communication terminal found is instructed by the user or the like, the communication terminal stops the discovery process and transmits a connection request to the other communication terminal by using the listen channel of the other communication terminal. Upon receiving the connection request through the listen channel, the other communication terminal returns a response to the connection request. In this way, a connection process between the communication terminals is initiated.
Patent Document 1: Japanese Unexamined Patent Application Publication No. JP-A 2013-176045
Non-Patent Document 1: Wi-Fi Alliance Technical Committee P2P Task Group Wi-Fi Peer-to-Peer (P2P) Technical Specification Version 1.1
However, in a case where one communication terminal transmits a connection request to another communication terminal by using the listen channel of the other communication terminal in a situation that a plurality of communication terminals adjacent to each other are executing the discovery process, respectively, there is no guarantee that the connection request is received by the other communication terminal. This is because the other communication terminal is also executing the discovery process and alternately repeating the search state and the listen state and hence there is no guarantee that the other communication terminal is in the listen state at a moment when the connection request is transmitted. Therefore, when the other communication terminal is not in the listen state but in the search state, the connection request is not received by the other communication terminal and therefore a response to the connection request is not returned. Then, the communication terminal transmitting the connection request retransmits the connection request until a response returns or a timeout occurs. Because the search state and the listen state are switched at random intervals as mentioned before, the connection request is eventually transmitted during a period when the other terminal is in the listen state. However, it is a problem that it takes time before that. This problem could generally occur in a communication network in which a communication terminal discovers another communication terminal existing around the communication terminal itself by sequentially switching a plurality of communication channels, not limited in a communication network conforming to the Wi-Fi Direct specification.